#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@Project ：图灵学习 
@File    ：11.对象关联.py
@IDE     ：PyCharm 
@Author  ：ChenLiGao
@Date    ：2024-10-21 16:28
'''
# 班级类
class ClassRoom:
    def __init__(self, cls_name):
        self.cls_name = cls_name

class Student:
    def __init__(self, stu_name):
        self.stu_name = stu_name

"""
    类的实例属性动态创建
"""

cls_room = ClassRoom("爬虫一班")

stu = Student("安娜")

cls_room.stu_info = stu

print(cls_room.stu_info.stu_name)